package com.liwei.lwmail.order.feign;

import com.liwei.common.utils.R;
import com.liwei.lwmail.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("lwmail-ware")
public interface WareFeignService {

    @PostMapping("/ware/waresku/hasStock")
    R getSkusHasStock(@RequestBody List<Long> skuIds);

    @GetMapping("/ware/wareinfo/fare/{addrId}")
    R getFare(@PathVariable("addrId")Long addrId);

    @PostMapping("/ware/waresku/lockOrder")
    R orderLockStock(@RequestBody WareSkuLockVo lockVo);

}
